﻿<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>状态栏显示鼠标位置</title>
  <script type="text/javascript">
    // 移动鼠标的方法
    function move(e){
      if(document.layers){
        var x =e.pageX;
        var y = e.pageY;
      }
      if(document.all){
        var x = event.x;
        var y = event.y + document.body.scrollTop;
        status = "x:" + x +" y:" + y;
      }
      document.onmousemove = move;
      if(document.layers){
        document.captureEvents(Event.MOUSEMOVE);
      }
      
    }
  </script>
</head>
<body>

</body>
</html>